using System;
using System.Collections.Generic;
using Unity.Collections;

namespace DA.AnimGraph {

    internal unsafe struct InitContext {
        internal NativeHashMap<AUID, Slot> slots;

        public InitContext(in NativeHashMap<AUID, Slot> slots) {
            this.slots = slots;
        }

        public void RegisterSlot(in AUID name, in SlotNode* node) {
            slots.Add(name, new Slot(node));
        }
    }

    public class BuildContext {
        public Dictionary<AUID, UnityEngine.Object> resourcesMap;
    }


    internal struct EvaluateContext {
        public int evaluateCounter; // todo:改为ulong？
        public float deltaTime;
    }


    public struct GraphContext : IDisposable {
        public Blackboard blackboard;
        public CurveBoard curveBoard;

        public void Dispose() {
            blackboard.Dispose();
            curveBoard.Dispose();
        }
    }

}
